package vip.meeet.dpattern.singleton;

/**
 * 简单，且绝对线程安全；坏处是并发性能极差，事实上完全退化到了串行
 */
public class SynSingleton {

    private static SynSingleton singleton;

    private SynSingleton() {
    }

    public synchronized static SynSingleton getInstance() {
        if (singleton == null) {
            singleton = new SynSingleton();
        }
        return singleton;
    }
}
